package mapping

import (
	"maya-service/model"
	"maya-service/model/entity"
)

// AiQuestionConsultStaticssEntityToDto entity data transfer
func AiQuestionConsultStaticssEntityToDto(aiQuestionConsultStaticss []*entity.AiQuestionConsultStatics) []*model.AiQuestionConsultStaticsInfo {
	out := make([]*model.AiQuestionConsultStaticsInfo, 0, len(aiQuestionConsultStaticss))
	for _, c := range aiQuestionConsultStaticss {
		out = append(out, AiQuestionConsultStaticsEntityToDto(c))
	}
	return out
}

// AiQuestionConsultStaticsEntityToDto entity data transfer
func AiQuestionConsultStaticsEntityToDto(e *entity.AiQuestionConsultStatics) *model.AiQuestionConsultStaticsInfo {
	return &model.AiQuestionConsultStaticsInfo{

		Id: e.Id,

		QuestionId: e.QuestionId,

		QuestionTopic: e.QuestionTopic,

		Questioner: e.Questioner,

		Avg: e.Avg,

		Count: e.Count,

		RankType: e.RankType,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
